Skip to content

fix(ui): remove unused ads-mobile-sdk dependency#588

Merged
chriscanin merged 1 commit intomainfrom
chris/fix-remove-ads-mobile-sdk
Apr 9, 2026
Merged

fix(ui): remove unused ads-mobile-sdk dependency#588
chriscanin merged 1 commit intomainfrom
chris/fix-remove-ads-mobile-sdk

Conversation

@chriscanin
Copy link
Copy Markdown
Member

Summary

  • Remove the unused ads-mobile-sdk transitive dependency from clerk-android-ui
  • This dependency (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:0.21.0-beta01) was explicitly declared but never imported in any source file
  • It causes duplicate class errors when used alongside react-native-google-mobile-ads or any library depending on play-services-ads-api, because both packages contain the same com.google.android.gms.ads.* classes

Reproducing the issue

Using @clerk/expo@3.1.6 + react-native-google-mobile-ads@15.8.3, running ./gradlew checkDebugDuplicateClasses produces ~50 duplicate class errors:

Duplicate class com.google.android.gms.ads.AdError found in modules
  ads-mobile-sdk-0.21.0-beta01.aar
  play-services-ads-api-24.6.0.aar

After this fix, the build passes cleanly.

Test plan

  • Reproduced duplicate class error with a clean Expo project (@clerk/expo@3.1.6 + react-native-google-mobile-ads@15.8.3)
  • Applied fix (clerk-android-ui built from this branch) — checkDebugDuplicateClasses passes
  • Verified ads-mobile-sdk has zero imports in the source/ui/src codebase
  • Verified the published POM no longer includes ads-mobile-sdk

Fixes clerk/javascript#8237

Remove the transitive ads-mobile-sdk dependency from clerk-android-ui.
This dependency was unused (no imports in source code) and caused
duplicate class errors when used alongside react-native-google-mobile-ads
or any library that depends on play-services-ads-api.

Fixes clerk/javascript#8237
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e65f8745-a558-42a3-a102-fcb6fc502403

📥 Commits

Reviewing files that changed from the base of the PR and between 86500d2 and 1146fda.

📒 Files selected for processing (2)
  • gradle/libs.versions.toml
  • source/ui/build.gradle.kts
💤 Files with no reviewable changes (2)
  • source/ui/build.gradle.kts
  • gradle/libs.versions.toml

📝 Walkthrough

Walkthrough

The pull request removes the ads-mobile-sdk dependency from the Android UI module. The adsMobileSdk version entry ("0.21.0-beta01") is deleted from the Gradle version catalog in gradle/libs.versions.toml, and the corresponding library alias for ads-mobile-sdk is removed. Additionally, the implementation(libs.ads.mobile.sdk) dependency is removed from the UI module's build configuration in source/ui/build.gradle.kts. This eliminates the transitive inclusion of the Google Ads Mobile SDK.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

No additional unlinked issues identified. The linked issue #8237 is directly addressed by these changes, as they remove the conflicting ads-mobile-sdk dependency at its source rather than requiring consumers to exclude it.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing an unused ads-mobile-sdk dependency from the ui module.
Description check ✅ Passed The pull request description provides a comprehensive summary of changes, includes context on the issue, reproduces the problem, outlines the test plan, and links to the relevant issue.
Linked Issues check ✅ Passed The changes fully address the requirements of issue #8237 by removing the unused ads-mobile-sdk dependency from clerk-android-ui, which resolves the duplicate class conflicts with play-services-ads-api.
Out of Scope Changes check ✅ Passed All changes are directly scoped to removing the unused ads-mobile-sdk dependency and its version declaration, with no extraneous modifications beyond what is required.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Timed out fetching pipeline failures after 30000ms


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chriscanin chriscanin merged commit f6cf4fb into main Apr 9, 2026
10 checks passed
@chriscanin chriscanin deleted the chris/fix-remove-ads-mobile-sdk branch April 9, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: clerk-android-ui pulls in ads-mobile-sdk, conflicts with play-services-ads

2 participants